/*
 *  The service provider interface to handle user interaction with he system.
 * 
 * @author: Oren Zamir
 */
package org.valire.usermanagement.services;

import java.util.List;

import org.valire.usermanagement.beans.User;



/**
 * The Interface UserService.
 */
public interface UserService {

	/**
	 * Gets the user entity bean.
	 *
	 * @param userName the user name
	 * @return the user
	 */
	public User getUser(String userName);
	
	/**
	 * Creates a new user.
	 *
	 * @param newUser the new user
	 * @return the user
	 */
	public User createUser(User newUser);
	
	/**
	 * Removes the user.
	 *
	 * @param user the user
	 */
	public void removeUser(User user);

	/**
	 * Gets the all users.
	 *
	 * @return the all users
	 */
	public List<User> getAllUsers();

	/**
	 * Gets the user.
	 *
	 * @param id the id
	 * @return the user
	 */
	User getUser(Integer id);

	/**
	 * Update user.
	 *
	 * @param user the user
	 */
	public void updateUser(User user);

	
	/**
	 * Reset password.
	 *
	 * @param user the user
	 * @return the new password (unencrypted)
	 */
	public String resetPassword(User user);
	
}
